Skip to content

Add Chief admission and resumable child waits to Project Tasks - #2226

Merged
zy95-12 merged 23 commits into
delivery/ai-centric-development-servicefrom
feat/2179-task-lifecycle
Nov 3, 2026
Merged

zy95-12 merged 23 commits into
delivery/ai-centric-development-servicefrom
feat/2179-task-lifecycle

Conversation

@zy95-12

@zy95-12 zy95-12 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Codex

Latest composition at54a6bb5a8: current execution/governance/context merged;175 targeted tests and core lint pass. Current full verify NOT rerun; earlier full numbers below refer to their older named heads. Actual DSH native return with real Chief intake passed before the final stale-decision fence; final composed runtime validation remains pending. Requirements version changes now stop an old Attempt through the original pool lifecycle, and canonical claim revisions fence late transfer/split decisions before/after awaited authority. Actual SDK subprocess fixture covers version-change stop with acknowledgement/process exit. Custom Developer-capability parent resumes use child-source admission and producer Workspace mapping. Red regressions and self-review recorded. Still Draft; no main merge/deployment/frontend/control-plane change or independent Review.

Refs #2179; stacked on #2225 (4101275). Head4826723ccf02b159ccdd7ca0cbbb27ebffe631d0. This is the original implementation PR for this issue; remaining acceptance stays here/dependent stages, not a replacement PR.

New canonical shared Project Tasks start as proposals. Chief verifies goal, project impact and acceptance before a committed Effect can start execution. Requirements are versioned; each Attempt pins the full revision, so a scope-only change invalidates old evidence and creates a fresh rework snapshot. Requirements changes enter the existing Task inbox. A failed Attempt blocks the Task commitment instead of ending it. Member change requests ask Chief to judge revision/cancellation/reopening; public HTTP cannot submit Chief or role authority. Generic board transitions, human completion and legacy Workflow assign cannot bypass the new canonical contract. Persisted pre-contract Task delivery behavior remains covered separately.

A role may split independent child proposals after confirmed source exit. The parent retains its Task, logical Session and working summary; an unsealed Attempt/workspace continues, while a sealed candidate requires one successor Attempt, releases its execution claim/quota, then waits for Chief-adjudicated child results. Failed/cancelled children do not satisfy waits. One stable outbox/Handoff request resumes the original parent role after all conditions are satisfied; children never close the parent or prove integration. Existing Effects, pools and Task construction are reused. Tests cover concurrent resume, restart replay, unconfirmed exit, failed commits and preservation of previous summaries.

Actual DSH testing exposed two relevant defects: the resident native Chief used stale facts between jobs (fixed in original #2225), and the legacy Workflow gateway counted Chief intake as a development slot. The quota guard now shares released-parent semantics and excludes Chief control jobs. The runtime fixture exercises actual native Chief intake and controls only disposable host-verification gates, so queue/revocation checks do not depend on model timing or a framework delay.

Validation at this head: full TZ=UTC npm run verify 4593 passed,0 failures,0 skips, including4 real DSH runtime checks with deterministic inference. Selected129 Task/Chief/pool/delivery tests passed. Lifecycle coverage98.44%lines/77.97%branches; child-source module97.56%lines/76.60%branches; merge-metadata module100%lines/91.43%branches. Baseline-red evidence covers missing lifecycle, complete requirement revision and Attempt-vs-Task failure. Existing complete-role-policy budget guard caught growing PROJECT.md history: current invariants remain, exact dated reports moved to linked docs/history without raising the limit or truncating guidance. Architecture/subsystem/API notes, PROJECT/ROADMAP/LESSONS, changelog and generated patches are included. README rewrite remains last in #2189.

Chief dependency judgement now supports version-bound waivers and accepted replacements with evidence; cancellation/reopening notifies Chief, and stale replacements reblock integration. The private pre-input port commits accepted child Git refs and source admissions through the existing Effects before reserving parent execution. Only matching Chief acceptance, candidate/test/Review evidence and current authority can admit sources. Public configure permission remains unchanged; moved refs, active writers, failed commits and invalidated results are refused. Parent sealing requires every required source's actual ancestry. Actual Git multi-source tests exposed first-only MERGE_HEAD inspection; all pending parents are now bounded and verified for local worktrees/resource clones. These tests use explicit deterministic child-acceptance fixtures, not a provider-built full loop.

Remaining issue acceptance: full real-provider parallel collaboration, post-resume dependency-plan interruption/reconciliation, native physical Session restoration/inflight stop #2184, normalized atomic storage #2182, complete public receipts/history queries #2185, and alternate legacy creation/cutover compatibility #2186. Cancelled children remain blocked safely until resolved; this PR does not claim those remaining paths are complete. No new real-provider full Chief/child-development acceptance is claimed. No merge/deploy/restart, control-plane/UI edit or interruption of original frontend Task40/PR48. Draft; author self-review is not an independent Reviewer PASS.

@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Nov 2, 2026
Keep Chief proposals separate from Maintainer and Owner approval. Preserve retired role context and room history without reassigning existing Tasks or inferring worker exit.
Keep exact latest Task-role native bindings and context parts, refuse unknown exit and missing handles, and use committed role catalogs when pinning execution rights. Preserve original Workflow lifecycle and legacy DAG workspace behavior.
Keep logical identity separate from artifact responsibility and SDK read-only policy. Preserve retired active claims while blocking new work until Chief selects an active target.
Preserve structured handoff identity through native delivery and restore archived context only after committed activation. Guard the actual DSH single-resource return path and keep historical implementation evidence outside the bounded active policy.

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Codex

原PR已推送54a6bb5a8,合成当前执行/角色治理/上下文基础。175项针对性检查及core lint通过;当前组合完整检查尚未重跑,不复用旧head的完整检查数字。实际DSH已走Chief接纳→池内Dev/Tester打回续接→Chief入口,最终组合运行时仍会再验证。

新增需求版本执行边界:Chief修改scope/impact等需求后,旧Attempt通过现有pool停止并确认退出;新增claim冻结需求版本,旧turn的transfer/split在授权前后均受版本校验,避免下一次巡检之前抢先交接。实际SDK子进程覆盖需求版本变化后停止/释放,失败回归均保留。自定义Developer能力的父任务续接继续使用child-source入场和实际Workspace producer映射。长期记忆、架构/子系统、原changelog和补丁同步。

继续合成SQLite与接口原PR,保持Draft,不合并部署、不改前端。

Base automatically changed from feat/2177-bounded-role-context to delivery/ai-centric-development-service November 3, 2026 09:14
Based on 54a6bb5; delivery equals preceding integrated tree. Historical checkpoint archive backported where needed; policy cap and all rules retained. Stage-only integration authorized by Owner. Residual scope: #2292.

zy95-12 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Owner 授权阶段合入 delivery,剩余范围转 #2292。当前 b77e598 基于已通过 tests-ok 的原源码 54a6bb5,同步集成祖先并提前带入最终版本已有的 M7 历史原文归档;仅文档归档,不改变运行代码、规则来源、容量上限或测试断言。最终组合源码 d720f8c 已完整验证 4726 pass / 0 fail / 0 skip。正式签名 Reviewer 门禁留待正式合入,不伪造 PASS、不修改仓库规则、不声称 enqueue-guard 通过;新 SHA CI 状态另计。#2179 按 Owner 要求阶段归档,余项保留 #2292。不发布、不部署。

@zy95-12
zy95-12 marked this pull request as ready for review November 3, 2026 09:15
@zy95-12
zy95-12 merged commit 6c63967 into delivery/ai-centric-development-service Nov 3, 2026
5 of 11 checks passed
@zy95-12
zy95-12 deleted the feat/2179-task-lifecycle branch November 3, 2026 09:15
zy95-12 added a commit that referenced this pull request Nov 3, 2026
Written-by: Codex

Latest composition at cca28b2 (merge9d3ab4e40): updated
Task/execution/context/governance integrated;31 selected
SQL/persistence/authority/policy tests and core lint pass. Actual DSH
canonical Chief admission and native Task-role return/continuation pass
against independently read committed SQLite snapshots, including
persisted activation intent, exit/release proofs and single-resource
serialization. Model deterministic, actual code/host tests; no
provider/production migration claim. Sixth runtime regression added;
current composed full verify NOT rerun. Initial probe exposed an
insertion-order assumption, not lost Attempts; predecessor references
now establish chronology. Full mandatory policy cap stays384k;
historical upstream inventory archived verbatim, active
governing/automation rules unchanged. Prior full counts below belong to
older named heads. Still Draft, no independent Review/main
merge/deployment.

Refs #2182. Stacked on #2226, base
feat/2179-task-lifecycle/4826723ccf02b159ccdd7ca0cbbb27ebffe631d0.
Head8f7dffab7c341467aa381c92436f95751ac453b2.

The original Store can opt into stateStorage: sqlite without introducing
another domain model, queue, identity or dispatcher. One SQL transaction
commits changed domain records, normalized history and Effects; the
existing save chain acknowledges Effects only after COMMIT. Global
commit-revision compare-and-set supplements the exclusive home lock.
WAL/FULL/foreign-key settings are configured and verified. Routine
state/query APIs do not add model calls, change goal/scope or rewrite
Project documents.

Migration validates original JSON ownership/schema, retains working
Task/claim/Handoff/SDK Session/Effect IDs and publishes a newer-version
JSON guard before SQL initialization. Prepared imports recover from a
hashed immutable source; a missing active database refuses to silently
revive an old import. SQL remains authoritative when the option is later
omitted; JSON is not another writable mirror. Foreign/future schema,
guard mismatch, invalid source and stale takeover fail closed.

Histories become separate rows; payloads above64KiB use private
immutable hashed files with individual16MiB bounds. Existing
artifacts/logs/workspaces stay in their original filesystem locations.
Compatibility still hydrates/scans full runtime state; this is not
constant-time persistence, memory eviction or a replacement for #2177
context budgets. Unreferenced payload collection and retention are not
automatic.

Private offline inspect/export/rollback tools preserve the latest
committed state and paired DB/WAL/SHM archives. A prepared rollback
fences runtime startup/writes and resumes only its exact
migration/export/revision. Remove explicit SQLite configuration before
restarting on JSON. No live migration was performed.

Validation on the committed content: full TZ=UTC npm run verify **4610
passed,0 failures,0 skips**, including4 actual DSH runtime checks with
deterministic inference on their existing JSON configuration. New SQL
tests include actual SIGKILL before/after COMMIT, injected transaction
failure, Store+Effects restart, stale writer/readonly fencing,
guard/import recovery, latest-state rollback and CLI/API checks.
Selected41 passed; storage modules95.49–100%lines
and81.82–87.50%branches. Original Project APIs against actual SQL
persist Task/intake together with zero model calls; this is not
real-provider full Task development acceptance. Parent-baseline
missing-SQL/Store-integration reds retained. Main986399246 versus
delivery741bf1ef scope is documented.

Included: architecture/subsystem/API configuration and recovery notes,
PROJECT/ROADMAP/LESSONS, changelog and generated patches. README
deployment overhaul remains last in #2189. Public scoped
receipts/events/history #2185 and legacy cutover #2186 remain pending;
SQL alone does not repair every pre-existing domain-level
acknowledgement/replay contract. Original #2171 role governance and
#2184 native Session/inflight acceptance also remain open. No
merge/deploy/restart, control-plane/UI edit, new worker/timer or
interruption of Task40/PR48. Draft; no independent Reviewer PASS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant